home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC]
/
NeXTSTEP 3.3 Dev Intel.iso
/
NextDeveloper
/
Headers
/
indexing
/
protocols.h
< prev
Wrap
Text File
|
1994-04-13
|
3KB
|
115 lines
/*
protocols.h
Copyright 1991,NeXT Computer,Inc.
*/
#import <objc/Object.h>
#import <btree/protocols.h>
@class NXData, IXAttributeBinder;
@protocol IXRecordReading
- (unsigned)count;
- readRecord:(unsigned)record fromZone:(NXZone *)zone;
- readRecord:(unsigned)record; // default malloc zone
@end
@protocol IXRecordWriting <IXRecordReading>
- empty;
- (unsigned)addRecord:anObject;
- replaceRecord:(unsigned)record with:anObject;
- removeRecord:(unsigned)record;
@end
// This protocol controls the activation and passivation of objects. By
// default, all objects respond to source:didReadRecord: with nil, through a
// category of Object. This causes passivation with typed stream archiving.
// For a much faster passivation mechanism, this method may return an object
// to be passivated; if self is returned, the receiver is passivated quickly.
@protocol IXRecordTranscription
- finishReading;
- source:aSource willWriteRecord:(unsigned)record;
- source:aSource didReadRecord:(unsigned)record;
@end
@protocol IXAttributeBinding
// Returns the receiver's attribute binder, if it maintains one.
- (IXAttributeBinder *)attributeBinder;
// Returns the receiver's bindings. The sender owns the object returned.
- (IXAttributeBinder *)provideBindings;
@end
// These methods evaluate the named instance variable for the specified record.
// NO is returned if the named instance variable does not exist.
@protocol IXTransientAccess
- (BOOL)getOpaqueValue:(NXData **)value
ofIvar:(const char *)name forRecord:(unsigned)record;
- (BOOL)getIntValue:(int *)value
ofIvar:(const char *)name forRecord:(unsigned)record;
- (BOOL)getFloatValue:(float *)value
ofIvar:(const char *)name forRecord:(unsigned)record;
- (BOOL)getDoubleValue:(double *)value
ofIvar:(const char *)name forRecord:(unsigned)record;
- (BOOL)getStringValue:(char **)value
ofIvar:(const char *)name forRecord:(unsigned)record;
- (BOOL)getStringValue:(char **)value inLength:(unsigned)length
ofIvar:(const char *)name forRecord:(unsigned)record;
- (BOOL)getObjectValue:(Object **)value
ofIvar:(const char *)name forRecord:(unsigned)record;
@end
// These methods evaluate the supplied selector for the specified record.
// NO is returned if the object does not respond to the supplied selector.
@protocol IXTransientMessaging
- (BOOL)getIntValue:(int *)value
ofMessage:(SEL)selector forRecord:(unsigned)record;
- (BOOL)getFloatValue:(float *)value
ofMessage:(SEL)selector forRecord:(unsigned)record;
- (BOOL)getDoubleValue:(double *)value
ofMessage:(SEL)selector forRecord:(unsigned)record;
- (BOOL)getStringValue:(char **)value
ofMessage:(SEL)selector forRecord:(unsigned)record;
- (BOOL)getStringValue:(char **)value inLength:(unsigned)length
ofMessage:(SEL)selector forRecord:(unsigned)record;
- (BOOL)getObjectValue:(Object **)value
ofMessage:(SEL)selector forRecord:(unsigned)record;
@end
// The following protocols are obselete, and may be not be defined in future
// releases. The methods are now declared by the classes that implement them.
@protocol IXRecordDiscarding
- clean;
- discardRecord:(unsigned)record;
- reclaimRecord:(unsigned)record;
@end
@protocol IXBlobWriting
- (BOOL)getValue:(void **)value andLength:(unsigned *)length
ofBlob:(const char *)name forRecord:(unsigned)record;
- (BOOL)setValue:(const void *)value andLength:(unsigned)length
ofBlob:(const char *)name forRecord:(unsigned)record;
@end